package com.hyfrogx.modules.app.controller.attention;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hyfrogx.common.utils.QueryExt;
import com.hyfrogx.common.utils.R;
import com.hyfrogx.modules.information.service.HyInformationVerifyService;
import com.hyfrogx.modules.manage.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author liubin
 * @date 2019/11/28 12:14
 */
@RestController
@RequestMapping(value = "api/free/attention")
@Api(value = "ApiAttentionController", tags = {"客户端--关注模块免登陆"})
public class ApiFreeAttentionController extends BaseController {
  @Autowired
  private HyInformationVerifyService verifyService;

  /**
   * 关注列表
   * @param map
   * @return
   */
  @RequestMapping(value = "notfollowedRecord", method = RequestMethod.GET)
  @ApiOperation("关注列表")
  public R getFollowRecord(@RequestParam Map<String, Object> map) {
    try {
      Page page = verifyService.getAllNotFollowClient(new QueryExt(map));
      return R.ok().put("data", page);
    } catch (Exception e) {
      return R.error(e.getMessage());
    }
  }
}
